/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package modelo;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;

/**
 *
 * @author fumio
 */
@Entity
public class TipoServico implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="seq_tipoServico")
    @SequenceGenerator(name="seq_tipoServico", sequenceName="seq_tipoServico", allocationSize=1)
    private Long idTipoServico;
    private String tipoServico;
    

    public Long getId() {
        return idTipoServico;
    }

    public void setId(Long id) {
        this.idTipoServico = id;
    }

    public String getTipoServico() {
        return tipoServico;
    }

    public void setTipoServico(String tipoServico) {
        this.tipoServico = tipoServico;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idTipoServico != null ? idTipoServico.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TipoServico)) {
            return false;
        }
        TipoServico other = (TipoServico) object;
        if ((this.idTipoServico == null && other.idTipoServico != null) || (this.idTipoServico != null && !this.idTipoServico.equals(other.idTipoServico))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "modelo.TipoServico[ id=" + idTipoServico + " ]";
    }
    
}
